1. Field of the Invention
The present invention generally relates to mass storage systems, and more particularly, to mass storage systems that store redundant data.
2. Description of the Related Art
Data storage systems are used within computer networks and systems to store large amounts of data that is used by multiple servers and client computers. Generally, one or more servers are connected to the storage system to supply data to and from a computer network. The data is transferred through the network to various users or clients. The data storage system generally comprises a controller that interacts with one or more storage devices such as one or more Winchester disk drives or other forms of data storage. To facilitate uninterrupted operation of the server as it reads and writes data from/to the storage system as well as executes applications for use by users, the storage system comprises a write cache that allows data from the server to be temporarily stored in the write cache prior to being written to a storage device. As such, the server can send data to the storage system and quickly be provided an acknowledgement that the storage system has stored the data. The acknowledgement is sent even though the storage system has only stored the data in the write cache and is waiting for an appropriate, convenient time to store the data in a storage device. As is well known in the art, storing data to a write cache is much faster than storing data directly to a disk drive. Consequently, the write cache buffers a large amount of data in anticipation of subsequently storing that data in a storage device.
To insure that a malfunction of the storage device does not render all of the data on the device useless, the data is generally backed up on a periodic basis. Various methods have been developed to “mirror” stored data to a second storage device such that an identical copy is made from one device to another. Because of the use of a write cache, data in both the write cache and the storage device to be mirrored must be correctly copied. As such, the process for mirroring a storage device can be complicated. In one method used in the art, all the application programs (hereinafter referred to as applications) that are executing on the server or servers are halted while the mirroring process is accomplished. During the mirroring process, the applications are halted to insure the data sent to the storage system is in a consistent state where the application could be restarted from this coherent image. Prior to copying data from the first storage device to the second storage device, the write cache must be flushed by writing all the information that is in the write cache to the first storage device. Once the cache is flushed, then a coherent image is stored on the first storage device. Next, the first storage device is completely copied to a second storage device or mirrored. After mirroring, the mirror is broken and the first storage device is then used again for data storage and the server begins executing applications. This mirroring process requires the applications to remain halted for a longer time and has fallen out of favor for a second type of mirroring process.
In a second mirroring process that is used in the art, the first storage device is copied to a second storage device as the first storage device is continuously used by the server to access data. A controller within the storage system uses the write cache to store data that will ultimately be stored in the first storage device while the copying function is being performed. Once the contents of the first storage device is copied to the second storage device, all the new data in the write cache is written to both the first and second storage devices. Alternatively, the controller may track what new data is written to the first storage device and simultaneously write the new data to the first storage device as well as the second storage device. After the first storage device is mirrored to the second storage device, the applications executing on the server are temporarily halted while the write cache within the storage system is flushed. During the flushing process, all the data that is in the write cache is written to both the first storage device and the second storage device such that, after the cache is flushed, the two storage devices are mirrors of each other. Once the cache is flushed, the storage system contains coherent copies of the data on the first and second devices. At this point, mirroring between the first and second storage devices is stopped (“breaking the mirror”) and the first storage device is again used for storing data and the applications that were temporarily halted are now restarted. The second storage device can now be used for other functions with the knowledge that all of the data that was on the first storage device was mirrored to the second storage device at a specific instant in time. For example, the second storage device data may now be copied to a back up media and used for permanent or long term storage. Once the backup is complete, the second storage device can be used for another mirroring operation at a later time to facilitate periodic backups of the data on the first storage device.
The major disadvantage of this second method for performing mirroring is that all of the applications must remain halted while the write cache is flushed. Since, in a large mass storage system, the write cache can be on the order of multiple gigabits of data storage the time required to flush the cache can be extensive. Consequently, the server is not executing applications during the period when the cache is being flushed. This waiting time can be noticeable to users that are interacting with the server at the time a periodic backup or mirroring function is performed.
Therefore there is a need in the art for a method and apparatus that improves the mirroring task within a mass storage system.